package com.hzncc.flowable_diboot.vo;

import com.diboot.core.binding.annotation.BindField;
import com.diboot.iam.entity.IamRole;
import com.diboot.iam.entity.IamUser;
import com.diboot.tenant.entity.IamTenant;
import com.hzncc.flowable_diboot.entity.RoleTenant;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
/**
* 角色租户 VO定义
* @author MyName
* @version 1.0
* @date 2024-08-08
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class RoleTenantListVO extends RoleTenant  {
private static final long serialVersionUID = 1684957092973433368L;
    /**
    * 角色 关联信息
    */

    @BindField(
        entity = IamRole.class,
        field = "name",
        condition = "this.role = id"
     )
    private String roleLabel;

    /**
    * 目标租户 关联信息
    */

    @BindField(
        entity = IamTenant.class,
        field = "name",
        condition = "this.target_tenant = id"
     )
    private String targetTenantLabel;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

}